package com.aWei.springbootinit.dataSource;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.aWei.springbootinit.model.entity.Picture;
import com.aWei.springbootinit.service.PictureService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 小维哥
 * @version 1.2  图片服务实现类
 */
@Service
public class PictureDataSource implements DataSource<Picture> {

        @Resource
        private  PictureService pictureService;


        @Override
        public Page<Picture> doSearch(String searchText, long pageNum, long pageSize) {
                Page<Picture> picturePage = pictureService.searchPicture(searchText, pageNum, pageSize);
                return picturePage;
        }
}
